Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Observe multiple contracts for ETH flow #3249

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sunce86
Copy link
Contributor

@sunce86 sunce86 commented Jan 21, 2025

Description

Explores the idea explained here: #3248 (comment)

My intuition says this should be enough, under the assumption that eth_getLogs works properly with multiple addresses.

This solution has one downside: we can't define block number from which we want to start indexing new contract. The reason is how the indexing is continued after the autopilot restart: we check the latest indexed block in the database, and use that to continue indexing. And this solution assumes that old and new contract indexing is completely synchronised and atomically inserted into database. So, bottom line, new contract events would be inserted from the point when new contract address is added to the autopilot configuration.

IMO, this tradeoff is fine considering other solutions complexity.

To verify, e2e test will be written.

TODOS:

  1. Refunder service needs to be adjusted to work with multiple contracts
  2. Write e2e test

Changes

  • ...
  • ...

How to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant